<template>
  <div class="home">
    <router-view></router-view>
    <!-- 标签栏
    van-tabbar
     v-model:对应的下面子选项的索引值
     cative-color="选中后的颜色"
     incative-color="没选中后的颜色"
     van-tabbar-item  icon="只能使用vant的图标"
     slot="default/icon"
      -->
    <van-tabbar
      active-color="#e40137"
      inactive-color="#b4b4bd"
      route
      placeholder
      class="tabbar"
    >
      <van-tabbar-item to="/home/company">
        <template #default>
          <div class="title">
            公司
          </div>
        </template>
        <template #icon>
          <i class="iconfont">&#xe63d;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/question">
        <template #default>
          <div class="title">
            刷题
          </div>
        </template>
        <template #icon>
          <i class="iconfont">&#xe63f;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/find">
        <template #default>
          <div class="title">
            发现
          </div>
        </template>
        <template #icon>
          <i class="iconfont">&#xe647;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item to="/home/my">
        <template #default>
          <div class="title">
            我的
          </div>
        </template>
        <template #icon>
          <i class="iconfont">&#xe645;</i>
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'Home',
  data () {
    return {} //这里空的也要写
  }
}
</script>

<style lang="less" scoped>
.home {
  .tabbar {
    height: 60px;
  }
  .iconfont {
    font-size: 28px;
  }
}
</style>
